package com.ujson.chat.client.builder;

import com.ujson.chat.common.proto.MessageProto;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <h3>ujson-parent</h3>
 * <p>登出消息创建器</p>
 *
 * @author JerryLiu  a1031757312@gmail.com
 * @version 1.0
 * @date 2021-11-23 21:50
 */
@Slf4j
@Service
public class LogoutMessageBuilder extends AbstractBuilder {
    @Override
    public MessageProto.MessageType getType() {
        return MessageProto.MessageType.LOGOUT_REQUEST;
    }

    public MessageProto.Message build(Channel channel) {
        return commonBuild(channel).toBuilder()
                .build();
    }
}
